package com.ruoyi.common.config;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author wule
 * @date 2024-04-10  22:06
 * @desc
 */
@Component
public class MyCommandRunner  implements CommandLineRunner {
	@Override
	public void run(String... args) {
		System.out.println("开始打开浏览器!");
		try {
			Runtime.getRuntime().exec("cmd   /c   start   http://localhost:80/");//可以指定自己的路径
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}
